<?php include dirname(__FILE__).'/common/header.php'; ?>

var img = new Ext.Panel({
	html:'<img src="'+list.siteUrl+'ys-pub/resources/images/zm/login-bg.jpg" width="100%" />',
	style:'width:100%;position:absolute'
})

var frm = new ZM.FormPanel({
	frame:true,
	border:true,
	title:'登录',
	bodyStyle:"height:100px;margin-top:20px;",
	style:'width:360px;padding-top:150px;margin-left:-180px;left:50%;position:absolute',
	url:list.baseUrl + 'login/authenticate',
	keySubmit:true,
	success:function(r){
		location.href = r.addon.url;
	},
	failure:function(){
		captcha.src = list.baseUrl+"login/captcha?"+(new Date().getTime());
		Ext.getCmp('captcha').setValue('');
	},
	items:[{
		fieldLabel:'帐&nbsp;&nbsp;&nbsp;号',
		allowBlank:false,
		name:'user_code'
	},{
		fieldLabel:'密&nbsp;&nbsp;&nbsp;码',
		name:'user_password',
		inputType:'password',
		allowBlank:false
	},{
		fieldLabel:'验证码',
		id:'captcha',
		name:'captcha',
		width:161,
		allowBlank:false
	},{
		fieldLabel:'验证码',
		hideLabel:true,
		width:'auto',
		style:'position:absolute;left:255px;margin-top:-26px;',
		html:'<img id="captcha_img" src="'+list.baseUrl+'login/captcha?'+(new Date().getTime())+'" />',
		xtype:'label'
	}]
});
var viewport = new Ext.Viewport({
	items:[img,frm]
})
var captcha = document.getElementById('captcha_img');
captcha.onclick = function(){
	captcha.src = list.baseUrl+"login/captcha?"+(new Date().getTime());
}
<?php include dirname(__FILE__).'/common/footer.php'; ?>